<div id="dianpuRuel<?php echo $uniqid;?>" class="dianpuRuel" style="padding: 20px">
  <el-row :gutter="20" justify="center" align="middle">
    <el-col :span="4">店铺名称：</el-col>
    <el-col :span="20">{{params.name}}</el-col>
  </el-row>
  <el-row :gutter="20" justify="center" align="middle">
    <el-col :span="4">店铺企业：</el-col>
    <el-col :span="20">{{params.company_name}}</el-col>
  </el-row>
  <el-row :gutter="20" justify="center" align="middle">
    <el-col :span="4">店铺法人：</el-col>
    <el-col :span="20">{{params.company_representative_name}}</el-col>
  </el-row>
  <el-row :gutter="20" justify="center" align="middle">
    <el-col :span="4">店铺联系电话：</el-col>
    <el-col :span="20">{{params.phone}}</el-col>
  </el-row>
  <el-row :gutter="20" justify="center" align="middle">
    <el-col :span="4">分销权限：</el-col>
    <el-col :span="20">
        <template v-for="(item, index) in ruleList">
          <el-checkbox v-model="item.checked">{{item.name}}</el-checkbox>
        </template>
    </el-col>
  </el-row>
</div>
<script>
  var dianpuRuelEditVm = new Vue({
    el: '#dianpuRuel<?php echo $uniqid;?>',
    data: {
      params: JSON.parse('<?php echo addslashes($dianpu);?>'),
      ruleList: JSON.parse('<?php echo addslashes($ruleList);?>'),
    },
    mounted(){
      this.init();
    },
    methods: {
      init(){
      },
      submit: function(){
        let postParams = {
          'id':this.params.id,
          'rules':this.ruleList
        };
        $.post('/admin/dianpu/set_rule', postParams, function(data){
          if(data.ret===0){
            $.messager.show({
              title:'提示',
              msg:data.msg,
              timeout:3000,
              showType:'slide'
            });
            $('#<?php echo $uniqid;?>').form('clear');
            $("#dianpudlg").dialog('close');
          }else{
            $.messager.alert('提示',data.msg,'warning');
          }
        });
      }
    }
  });
  $('#dianpuRuleSubmit').click(function(data){
    dianpuRuelEditVm.submit();
  })
</script>
<style>
  .zindex_popper{
    z-index: 20000 !important;
  }
  .dianpuRuel .el-row{
    border-width: 0px 1px 1px 1px;
    border-color: #EFEFEF;
    border-style: solid;
    font-size: 14px;
    line-height: 26px;
    padding: 10px 0;
  }

  .dianpuRuel .el-row:first-child{
    border-width: 1px;
  }

  .dianpuRuel .el-row .el-col:first-child {
    text-align: right;
    font-weight: bold;
  }
  .dianpuRuel .el-row .el-col:last-child {
    text-align: left;
  }
</style>